package com.ck.admin.base;

/**
 * @ClassName BaseCode
 * @Description
 * @Author admin
 * @Date 2019/1/22 17:46
 **/
public enum BaseCode {
    SUCCESS(200, "请求成功"),
    FAIL(-1, "系统异常，请联系管理员"),
    INNER_ERROR(500, "服务器内部错误"),
    HTTP_METHOD_NOT_ALLOW_ERROR(601, "http请求method不对"),
    HTTP_CONNECTION_TIME_OUT(602, "http请求连接超时"),
    HTTP_READ_TIME_OUT(603, "http读超时"),
    HTTP_INNTER_CONNECTION_TIME_OUT(652, "内部系统调用连接超时"),
    HTTP_INNTER_READ_TIME_OUT(653, "内部系统调用读取超时"),
    HTTP_INNTER_SERVICE_NOT_AVAILABLE(654, "内部系统调用服务不可用"),
    HTTP_INNTER_ERROR(689, "http内部调用服务错误"),
    HTTP_ERROR(699, "http请求错误"),
    SQL_ERROR(799, "sql操作异常"),
    REDIS_ERROR(899, "redis操作异常"),
    FILE_ERROR(1199, "文件操作异常"),
    PARAM_ERROR(1200, "参数教研错误");

    private Integer code;
    private String message;

    private BaseCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getMessage() {
        return this.message;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.message;
    }
}
